1. Field of the Invention
This invention is related to the field of interrupts, and more particularly to delivering interrupts over a communication fabric in a system such as a system on a chip (SOC).
2. Description of the Related Art
Computing systems generally include one or more processors that serve as central processing units (CPUs), along with one or more peripherals that implement various hardware functions. The CPUs execute the control software (e.g. an operating system) that controls operation of the various peripherals. The CPUs can also execute applications, which provide user functionality in the system. Additionally, the CPUs can execute software that interacts with the peripherals and performs various services on the peripherals behalf.
The peripherals can cause the CPUs to execute software on their behalf using interrupts. Generally, the peripherals issue an interrupt to the CPU, typically by asserting an interrupt signal to an interrupt controller that controls the interrupts going to the CPU. The interrupt causes the CPU to stop executing its current software task, saving state for the task so that it can be resumed later. The CPU can load state related to the interrupt, and begin execution of an interrupt service routine. The interrupt service routine can be driver code for the peripheral, or may transfer execution to the driver code as needed. Generally, driver code is code provided for a peripheral device to be executed by the CPU, to control and/or configure the peripheral device.
In some cases, the peripheral writes data to memory to be operated upon by the interrupt service routine (“interrupt code”) and/or the driver code. Accordingly, the peripheral may transmit the write operations and assert the interrupt to the CPU. This procedure creates a race condition between the write operations propagating to memory and the execution of the interrupt code/driver code. More particularly, the write operations may not have reached the point of “globally visibility” to the CPU. If the writes are globally visible, the data written by the write to memory will be returned by a read of the same memory location, even if the writes have not actually reached memory yet. If the code begins executing before the writes are globally visible, the code may read the previous values from memory (prior to the writes), which could lead to erroneous operation.